/*
 *  InterpolatedData2.cpp
 *  MarketDataAnalyzer 2
 *
 *  Created by jiro on 10/10/03.
 *  Copyright 2010 jiro music. All rights reserved.
 *
 */

#include "InterpolatedData2.h"

InterpolatedData2::InterpolatedData2( const std::vector< double >& validData, int sampleCount )
	: InterpolatedData( validData, sampleCount )
{
}

double InterpolatedData2::GetAt( int index ) const
{
	int reIndex = static_cast<int>( density * index );
	return validData[ reIndex ];
}

InterpolatedData::InterpolationType InterpolatedData2::GetInterpolationType() const
{
	return InterpolatedData::NearestNeighbour;
}
